<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="all" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="classification" content="" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<script type="text/javascript">
function addChildToForm(name, value, form)
{
    if ( typeof name != "string" || typeof value != "string" || typeof form == "undefined" )
    {
        return false;
    }
    var input = document.createElement("input");
    input.name = name;
    input.value = value;
    form.appendChild(input);
}
function uploadOnshelfGoodsWeb()
{
    var obj_form = $O("goods_form");
    obj_form.action = "http://localhost/jiajia/nanbeihuo/index.php?controller=goods&action=uploadonshelfgoodsweb";
    obj_form.method = "post";
    addChildToForm("callback", "uploadOnshelfGoodsWebCallback", obj_form);
    obj_form.submit();
    return false;
}
function onshelfGoodsXLS()
{
    var obj_form = $O("goods_xls_form");
    obj_form.action = "http://localhost/jiajia/nanbeihuo/index.php?controller=goods&action=onshelfgoodsxls";
    obj_form.method = "post";
    addChildToForm("callback", "onshelfGoodsXLSCallback", obj_form);
    obj_form.submit();
}
function uploadGoodsWeb()
{
    var xmlhttp   = new Ajax();
    var url       = "http://localhost/jiajia/nanbeihuo/index.php?controller=goods&action=uploadonshelfgoodsweb";
    var goods_id= $O("goods_id").value; 
    var goods_no  = $O("goods_no").value; 
    var market_price  = $O("market_price").value; 
    var mall_price     = $O("mall_price").value; 
    var vip_price     = $O("vip_price").value; 
    var coupon_type     = $O("coupon_type").value; 
    var discount_card_type     = $O("discount_card_type").value; 
    var point     = $O("point").value; 
    var exp     = $O("exp").value; 
    var vip_exp     = $O("vip_exp").value; 
    var offshelf_time     = $O("offshelf_time").value; 
    var stock     = $O("stock").value; 
    var min_stock     = $O("min_stock").value; 
    var cross_sell_product_ids     = $O("cross_sell_product_ids").value; 
    var bundle_product_ids     = $O("bundle_product_ids").value; 
    var gift_ids     = $O("gift_ids").value; 
    var paytool_ids     = $O("paytool_ids").value; 

    var postStr   = "goods_id="+goods_id+"&market_price="+market_price+"&callback=uploadGoodsWebCallback"+"&mall_price="+mall_price+"&vip_price="+vip_price+"&coupon_type="+coupon_type+"&discount_card_type="+discount_card_type+"&point="+point+"&exp="+exp+"&vip_exp="+vip_exp+"&offshelf_time="+offshelf_time+"&stock="+stock+"&min_stock="+min_stock+"&cross_sell_product_ids="+cross_sell_product_ids+"&bundle_product_ids="+bundle_product_ids+"&gift_ids="+gift_ids+"&paytool_ids="+paytool_idss;
    xmlhttp.request(url, "post", false, postStr, ajaxCb, emptyFn, emptyFn);
    
    return false;
}
function emptyFn(){}
function ajaxCb(json){eval("("+ json +")");}
</script>
<button onclick="uploadOnshelfGoodsWeb();return false;">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="uploadGoodsWeb();return false;">导出xls</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="onshelfGoodsXLS();return false;">xls导入</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="uploadGoodsWeb();return false;">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="uploadGoodsWeb();return false;">同步</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br/>
<br/>
<form id = "goods_xls_form" name="goods_xls_form" method="post" enctype="multipart/form-data">
商品xls文件<input type="file" name="goods_file_xls" id="goods_file_xls"></input>
<br/>
<br/>
</form>
<form id = "goods_form" name="goods_form" method="post">
商品ID<input type="text" name="goods_id" id="goods_id"></input>
<br/>
<br/>
市场价<input type="text" name="market_price" id="market_price"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
商城价<input type="text" name="mall_price" id="mall_price"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
会员价<input type="text" name="vip_price" id="vip_price"></input>
<br/>
<br/>
支持红包类型
<input type="text" cols="70" name="coupon_type" id="coupon_type"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
支持折扣卡类型
<input type="text" cols="70" name="discount_card_type" id="discount_card_type"></input>
<br/>
<br/>
积分<input type="text" name="point" id="point"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
经验值<input type="text" name="exp" id="exp"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
会员经验值<input type="text" name="vip_exp" id="vip_exp"></input>
<br/>
<br/>
下架时间<input type="text" name="offshelf_time" id="offshelf_time"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
库存<input type="text" name="stock" id="stock"></input>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
最低库存<input type="text" name="min_stock" id="min_stock"></input>
<br/>
<br/>
关联销售商品<br/><textarea name="cross_sell_product_ids" id="cross_sell_product_ids" cols="90" rows="8"></textarea>
<br/>
<br/>
捆绑销售商品<br/><textarea name="bundle_product_ids" id="bundle_product_ids" cols="90" rows="8"></textarea>
<br/>
<br/>
赠品<br/><textarea name="gift_ids" id="gift_ids" cols="90" rows="8"></textarea>
<br/>
<br/>
支付类型<br/><textarea name="paytool_ids" id="paytool_ids" cols="90" rows="8"></textarea>
<br/>
<br/>
</form>
<br/>
</body>
</html>